<!doctype html><html lang=cn-zh><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge"><style type=text/css>body{font-family:monospace}</style><title>[Python]python如何方便的操作MySQL和Oracle数据库</title>
<meta name=description content="A blog maintained by Vimiix."><link rel=stylesheet href=/css/style.css><script>var _hmt=_hmt||[];(function(){var e,t=document.createElement("script");t.src="https://hm.baidu.com/hm.js?7c24231917964240bae97e813810620c",e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(t,e)})()</script></head><body><header>====================<br>== Hi, I'm Vimiix ==<br>====================<div style=float:right;color:gray;font-size:x-large>Get hands dirty.</div><br><p><nav><a href=https://www.vimiix.com/><b>首页</b></a>.
<a href=/posts/><b>文章列表</b></a>.
<a href=/projects/><b>开源项目</b></a>.
<a href=/tags/><b>标签</b></a>.
<a href=/friends/><b>友链</b></a>.
<a href=/about/><b>关于我</b></a>.
<a href=/index.xml><b>RSS</b></a>.</nav></p></header><main><article><h1>[Python]python如何方便的操作MySQL和Oracle数据库</h1><b><time>2018.01.30 01:27</time></b>
<a href=/tags/python>Python</a>
<a href=/tags/pymysql>pymysql</a>
<a href=/tags/cx_oracle>cx_Oracle</a><div><h1 id=环境>环境</h1><ul><li>python3 <a href=https://www.python.org/downloads/release/python-364/>官方网站下载</a></li><li>pymysql <code>pip3 install pymysql</code></li><li>cx_Oracle <code>pip3 install cx-Oracle</code></li></ul><h1 id=使用-pymysql-创建-mysql-操作用的实例类和游标类>使用 pymysql 创建 MySQL 操作用的实例类和游标类</h1><blockquote><p>gist 地址：<a href=https://gist.github.com/vimiix/c5611283604968cc8d038781e2fdd982>https://gist.github.com/vimiix/c5611283604968cc8d038781e2fdd982</a></p></blockquote><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#66d9ef>class</span> <span style=color:#a6e22e>MySQLCursor</span>:
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#34;&#34;&#34;创建一个游标类&#34;&#34;&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __init__(self,cursor,logger):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>=</span>cursor
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>logger<span style=color:#f92672>=</span>logger
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> <span style=color:#a6e22e>execute</span>(self,sql,params<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>logger<span style=color:#f92672>.</span>info(sql<span style=color:#f92672>+</span>str(params))
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(sql, params)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(<span style=color:#e6db74>&#34;select last_insert_id()&#34;</span>)
</span></span><span style=display:flex><span>        res <span style=color:#f92672>=</span> self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>fetchone()
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> len(res)<span style=color:#f92672>==</span><span style=color:#ae81ff>1</span>:
</span></span><span style=display:flex><span>            <span style=color:#66d9ef>if</span> type(res)<span style=color:#f92672>==</span>type({}):
</span></span><span style=display:flex><span>                <span style=color:#66d9ef>return</span> res[<span style=color:#e6db74>&#39;last_insert_id()&#39;</span>]
</span></span><span style=display:flex><span>            <span style=color:#66d9ef>if</span> type(res)<span style=color:#f92672>==</span>type(()):
</span></span><span style=display:flex><span>                <span style=color:#66d9ef>return</span> res[<span style=color:#ae81ff>0</span>]
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>return</span>  <span style=color:#ae81ff>0</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> <span style=color:#a6e22e>query</span>(self,sql,params<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>,with_description<span style=color:#f92672>=</span><span style=color:#66d9ef>False</span>):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>logger<span style=color:#f92672>.</span>info(sql<span style=color:#f92672>+</span>str(params))
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(sql, params)
</span></span><span style=display:flex><span>        rows <span style=color:#f92672>=</span> self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>fetchall()
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> with_description:
</span></span><span style=display:flex><span>            res <span style=color:#f92672>=</span> rows, self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>description
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>else</span>:
</span></span><span style=display:flex><span>            res <span style=color:#f92672>=</span> rows
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>return</span> res
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#66d9ef>class</span> <span style=color:#a6e22e>MySQLInstance</span>:
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#34;&#34;&#34;创建一个实例类&#34;&#34;&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __init__(self,host,port,username,password,schema<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>,
</span></span><span style=display:flex><span>                 charset<span style=color:#f92672>=</span><span style=color:#e6db74>&#39;utf8&#39;</span>,dict_result<span style=color:#f92672>=</span><span style=color:#66d9ef>False</span>,logger<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>host<span style=color:#f92672>=</span>host
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>port<span style=color:#f92672>=</span>port
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>username<span style=color:#f92672>=</span>username
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>password<span style=color:#f92672>=</span>password
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>schema<span style=color:#f92672>=</span>schema
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>charset<span style=color:#f92672>=</span>charset
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>dict_result<span style=color:#f92672>=</span>dict_result
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> logger <span style=color:#f92672>is</span> <span style=color:#66d9ef>None</span>:
</span></span><span style=display:flex><span>            logger<span style=color:#f92672>=</span>logging<span style=color:#f92672>.</span>getLogger(__name__)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>logger<span style=color:#f92672>=</span>logger
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __enter__(self):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>con<span style=color:#f92672>=</span>pymysql<span style=color:#f92672>.</span>connect(host<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>host,port<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>port,user<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>username,
</span></span><span style=display:flex><span>                                 password<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>password,charset<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>charset,db<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>schema)
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> self<span style=color:#f92672>.</span>dict_result:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>con<span style=color:#f92672>.</span>cursor(pymysql<span style=color:#f92672>.</span>cursors<span style=color:#f92672>.</span>DictCursor)
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>else</span>:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>=</span>self<span style=color:#f92672>.</span>con<span style=color:#f92672>.</span>cursor()
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>return</span> MySQLCursor(self<span style=color:#f92672>.</span>cursor,self<span style=color:#f92672>.</span>logger)
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __exit__(self,exc_type, exc_value, exc_tb):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(<span style=color:#e6db74>&#34;commit&#34;</span>)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>close()
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>con<span style=color:#f92672>.</span>close()
</span></span></code></pre></div><p>有了这两个类，在操作数据库的时候就可以结合 Python 中的 <code>with</code> 关键词优雅的使用了。</p><p><code>dict_result</code> 为 <code>True</code> 时，返回结果集为字典，<code>False</code> 为元祖</p><p>示例：</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span>mysql_db <span style=color:#f92672>=</span> {
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#34;host&#34;</span>: <span style=color:#e6db74>&#39;11.11.11.11&#39;</span>, <span style=color:#75715e># ip 地址</span>
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#39;port&#39;</span>: <span style=color:#ae81ff>3306</span>,          <span style=color:#75715e># 端口</span>
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#39;username&#39;</span>: <span style=color:#e6db74>&#39;root&#39;</span>,    <span style=color:#75715e># 用户名</span>
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#34;password&#34;</span>: <span style=color:#e6db74>&#39;xxxx&#39;</span>,    <span style=color:#75715e># 密码</span>
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#39;schema&#39;</span>:<span style=color:#e6db74>&#39;db&#39;</span>          <span style=color:#75715e># 数据库名</span>
</span></span><span style=display:flex><span>}
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#66d9ef>with</span> MySQLInstance(<span style=color:#f92672>**</span>mysql_db, dict_result<span style=color:#f92672>=</span><span style=color:#66d9ef>True</span>) <span style=color:#66d9ef>as</span> db:
</span></span><span style=display:flex><span>    print db<span style=color:#f92672>.</span>query(<span style=color:#e6db74>&#39;select 1&#39;</span>)
</span></span></code></pre></div><h1 id=使用-cx_oracle-创建-mysql-操作用的实例类和游标类>使用 cx_Oracle 创建 MySQL 操作用的实例类和游标类</h1><blockquote><p>gist 地址：<a href=https://gist.github.com/vimiix/92e5f37b38a35aaf9b9f3c0e7bb00538>https://gist.github.com/vimiix/92e5f37b38a35aaf9b9f3c0e7bb00538</a></p></blockquote><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#66d9ef>class</span> <span style=color:#a6e22e>OracleCursor</span>:
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#34;&#34;&#34;游标类&#34;&#34;&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __init__(self, cursor, logger, dict_result):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor <span style=color:#f92672>=</span> cursor
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>logger <span style=color:#f92672>=</span> logger
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>dict_result <span style=color:#f92672>=</span> dict_result
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> <span style=color:#a6e22e>_dict_result</span>(self, cursor):
</span></span><span style=display:flex><span>        cols <span style=color:#f92672>=</span> [d[<span style=color:#ae81ff>0</span>]<span style=color:#f92672>.</span>lower() <span style=color:#66d9ef>for</span> d <span style=color:#f92672>in</span> cursor<span style=color:#f92672>.</span>description]
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>def</span> <span style=color:#a6e22e>row_factory</span>(<span style=color:#f92672>*</span>args):
</span></span><span style=display:flex><span>            <span style=color:#66d9ef>return</span> dict(zip(cols, args))
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>return</span> row_factory
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> <span style=color:#a6e22e>execute</span>(self, sql, params<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>):
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> params:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(sql, params)
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>else</span>:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(sql)
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> <span style=color:#a6e22e>query</span>(self, sql, params<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>, with_description<span style=color:#f92672>=</span><span style=color:#66d9ef>False</span>):
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> params:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(sql, params)
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>else</span>:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(sql)
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> self<span style=color:#f92672>.</span>dict_result:
</span></span><span style=display:flex><span>            self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>rowfactory <span style=color:#f92672>=</span> self<span style=color:#f92672>.</span>_dict_result(self<span style=color:#f92672>.</span>cursor)
</span></span><span style=display:flex><span>        rows <span style=color:#f92672>=</span> self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>fetchall()
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> with_description:
</span></span><span style=display:flex><span>            res <span style=color:#f92672>=</span> rows, self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>description
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>else</span>:
</span></span><span style=display:flex><span>            res <span style=color:#f92672>=</span> rows
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>return</span> res
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#66d9ef>class</span> <span style=color:#a6e22e>OracleInstance</span>:
</span></span><span style=display:flex><span>	<span style=color:#e6db74>&#34;&#34;&#34;实例类&#34;&#34;&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __init__(self, username, password, host, port, sid,
</span></span><span style=display:flex><span>                 charset<span style=color:#f92672>=</span><span style=color:#e6db74>&#39;utf8&#39;</span>,dict_result<span style=color:#f92672>=</span><span style=color:#66d9ef>False</span>,logger<span style=color:#f92672>=</span><span style=color:#66d9ef>None</span>):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>username <span style=color:#f92672>=</span> username
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>password <span style=color:#f92672>=</span> password
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>host <span style=color:#f92672>=</span> host
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>port <span style=color:#f92672>=</span> port
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>sid <span style=color:#f92672>=</span> sid
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>charset <span style=color:#f92672>=</span> charset
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>dict_result <span style=color:#f92672>=</span> dict_result
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>if</span> logger <span style=color:#f92672>is</span> <span style=color:#66d9ef>None</span>:
</span></span><span style=display:flex><span>            logger<span style=color:#f92672>=</span>logging<span style=color:#f92672>.</span>getLogger(__name__)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>logger <span style=color:#f92672>=</span> logger
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __enter__(self):
</span></span><span style=display:flex><span>        dsn_tns <span style=color:#f92672>=</span> cx_Oracle<span style=color:#f92672>.</span>makedsn(self<span style=color:#f92672>.</span>host, self<span style=color:#f92672>.</span>port, self<span style=color:#f92672>.</span>sid)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>con <span style=color:#f92672>=</span> cx_Oracle<span style=color:#f92672>.</span>connect(self<span style=color:#f92672>.</span>username, self<span style=color:#f92672>.</span>password, dsn_tns)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor <span style=color:#f92672>=</span> self<span style=color:#f92672>.</span>con<span style=color:#f92672>.</span>cursor()
</span></span><span style=display:flex><span>        <span style=color:#66d9ef>return</span> OracleCursor(self<span style=color:#f92672>.</span>cursor, self<span style=color:#f92672>.</span>logger, self<span style=color:#f92672>.</span>dict_result)
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>    <span style=color:#66d9ef>def</span> __exit__(self, exc_type, exc_val, exc_tb):
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>execute(<span style=color:#e6db74>&#34;commit&#34;</span>)
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>cursor<span style=color:#f92672>.</span>close()
</span></span><span style=display:flex><span>        self<span style=color:#f92672>.</span>con<span style=color:#f92672>.</span>close()
</span></span></code></pre></div><p>和 MySQL 同样用法, 示例：</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span>ORACLE_DB <span style=color:#f92672>=</span> {
</span></span><span style=display:flex><span>    <span style=color:#e6db74>&#39;username&#39;</span>: <span style=color:#e6db74>&#39;sys&#39;</span>,       <span style=color:#75715e># 用户名</span>
</span></span><span style=display:flex><span>    <span style=color:#e6db74>&#39;password&#39;</span>: <span style=color:#e6db74>&#39;xxxxx&#39;</span>,     <span style=color:#75715e># 密码</span>
</span></span><span style=display:flex><span>    <span style=color:#e6db74>&#39;host&#39;</span>: <span style=color:#e6db74>&#39;11.11.11.11&#39;</span>,   <span style=color:#75715e># ip地址</span>
</span></span><span style=display:flex><span>    <span style=color:#e6db74>&#39;port&#39;</span>: <span style=color:#ae81ff>1521</span>,            <span style=color:#75715e># 端口号</span>
</span></span><span style=display:flex><span>    <span style=color:#e6db74>&#39;sid&#39;</span>: <span style=color:#e6db74>&#39;orcl&#39;</span>            <span style=color:#75715e># sid</span>
</span></span><span style=display:flex><span>}
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#66d9ef>with</span> OracleInstance(<span style=color:#f92672>**</span>ORACLE_DB, dict_result<span style=color:#f92672>=</span><span style=color:#66d9ef>True</span>) <span style=color:#66d9ef>as</span> db:
</span></span><span style=display:flex><span>    print(db<span style=color:#f92672>.</span>query(<span style=color:#e6db74>&#39;select * from dba_tables&#39;</span>))
</span></span></code></pre></div></div></article></main><aside><div><div><h3>LATEST POSTS</h3></div><div><ul><li><a href=/posts/2025-10-16-kubernetes-apiserver-authorization-mechanism/>Kubernetes APIServer 鉴权机制</a></li><li><a href=/posts/2025-09-30-kubernetes-apiserver-authentication-mechanism/>Kubernetes APIServer 认证机制</a></li><li><a href=/posts/2024-12-16-deploy-kubernetes-by-kubeadm/>使用 kubeadm 搭建 kubernetes 集群</a></li><li><a href=/posts/2024-09-20-how-to-code-review/>如何做code review</a></li><li><a href=/posts/2024-08-12-weakref-in-python/>Python中的弱引用</a></li></ul></div></div></aside><footer><p>Social Links:
<a href=https://github.com/vimiix><b>Github</b></a>.
<a href=https://www.douban.com/people/vimiix/><b>Douban</b></a>.
<a href=mailto:i@vimiix.com><b>Email</b></a>.<br><hr>&copy; 2017-2025
Vimiix Yao; All rights reserved.
<a href=https://beian.miit.gov.cn/>京ICP备19015214号-1</a></p><script src=https://l2dwidget.js.org/lib/L2Dwidget.min.js></script><script>L2Dwidget.init({model:{jsonPath:"https://unpkg.com/live2d-widget-model-tororo@1.0.5/assets/tororo.model.json"}})</script></footer></body></html>